﻿@model IEnumerable<ECatalog.Models.ServerParam>
<div class="container">
    <div class="row">
        <p>
            @Html.ActionLink("Добавить настройку", "Create", null, new { @class = "btn btn-primary" })
        </p>
        <table class="table table-bordered table-hover">
            <tr>
                <th>IP сервера
                </th>
                <th>ID Клиента
                </th>
                <th>Организация
                </th>
                <th>Магазин
                </th>
                <th></th>
            </tr>

            @foreach (var item in Model)
            {
                <tr>
                    <td>
                        @Html.DisplayFor(modelItem => item.ServerIp)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.ClientId)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.Organization.Name)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.Shop.Name)
                    </td>
                    <td>
                        @Html.ActionLink("Редактировать", "Edit", new { id = item.ServerParamId }) |
            @using (Html.BeginForm("Delete", "ServerConfig", new { id = item.ServerParamId }))
            {
                <input type="submit" value="Удалить" class="btn btn-link" />
            }

                    </td>
                </tr>
            }

        </table>
    </div>
</div>

